package com.chenxin.common.exception.wms;

/**
 * wms过程异常
 *
 * @author gry
 */
public class WmsException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    /**
     * 错误码
     */
    private String code;

    /**
     * 错误提示
     */
    private String message;

    /**
     * 错误明细，内部调试错误
     */
    private String detailMessage;

    /**
     * 空构造方法，避免反序列化问题
     */
    public WmsException() {
    }

    public WmsException(String message) {
        this.message = message;
    }

    public WmsException(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getDetailMessage() {
        return detailMessage;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public String getCode() {
        return code;
    }

    public WmsException setMessage(String message) {
        this.message = message;
        return this;
    }

    public WmsException setDetailMessage(String detailMessage) {
        this.detailMessage = detailMessage;
        return this;
    }
}
